package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbKnowledge entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_KNOWLEDGE", schema = "dbo", catalog = "AGDB")
public class TbKnowledge implements java.io.Serializable {

	// Fields

	private String KId;
	private TbKnowledgeType tbKnowledgeType;
	private String KContent;
	private String a;
	private String b;
	private String c;
	private Set<TbKKkey> tbKKkeies = new HashSet<TbKKkey>(0);

	// Constructors

	/** default constructor */
	public TbKnowledge() {
	}

	/** minimal constructor */
	public TbKnowledge(String KId) {
		this.KId = KId;
	}

	/** full constructor */
	public TbKnowledge(String KId, TbKnowledgeType tbKnowledgeType,
			String KContent, String a, String b, String c,
			Set<TbKKkey> tbKKkeies) {
		this.KId = KId;
		this.tbKnowledgeType = tbKnowledgeType;
		this.KContent = KContent;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbKKkeies = tbKKkeies;
	}

	// Property accessors
	@Id
	@Column(name = "K_ID", unique = true, nullable = false, length = 10)
	public String getKId() {
		return this.KId;
	}

	public void setKId(String KId) {
		this.KId = KId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "KT_ID")
	public TbKnowledgeType getTbKnowledgeType() {
		return this.tbKnowledgeType;
	}

	public void setTbKnowledgeType(TbKnowledgeType tbKnowledgeType) {
		this.tbKnowledgeType = tbKnowledgeType;
	}

	@Column(name = "K_CONTENT", length = 1024)
	public String getKContent() {
		return this.KContent;
	}

	public void setKContent(String KContent) {
		this.KContent = KContent;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbKnowledge")
	public Set<TbKKkey> getTbKKkeies() {
		return this.tbKKkeies;
	}

	public void setTbKKkeies(Set<TbKKkey> tbKKkeies) {
		this.tbKKkeies = tbKKkeies;
	}

}